All Functions Used on PO33Q

sd

{stats}

Get standard deviation of a vector

save_tt

{tinytable}

Save a tinytable object to a file

tibble

{tibble}

A modern data frame from the tidyverse

factor

{base}

Create a factor

colMeans

{base}

Computes the means of each column of a numeric matrix or data frame

scale_color_manual

{ggplot2}

Manually sets the colours used in a ggplot color scale to user-specified values

arrange

{dplyr}

Sort values of data frame according to a variable/combination of variables

is.na

{base}

Check if a value is NA/elements of vector are NA

setwd

{base}

Set Working Directory

complete.cases

{stats}

Find Complete Cases

group_by

{dplyr}

Group tibble/data.frame by a factor variable. All further tidyverse operations are performed group-wise

lm

{stats}

Fit linear models using least squares

read_excel

{readxl}

Read an Excel file

log

{base}

log (default base = e)

median

{stats}

Get median of a vector

str

{utils}

Get the structure of an R object

na.omit

{stats}

Remove missing values

sim_slopes

{interactions}

Perform simple slopes analysis for interaction effects.

mean

{base}

Get mean of a vector

factor

{base}

Create factor variables

list

{base}

Create a list object

order

{base}

Get indexes that will sort a vector

predict

{stats}

Generate predicted values from model objects

filter

{dplyr}

Filter out rows of a data frame according to logical vector

c

{base}

Combine values/vectors into a vector

seq

{base}

Create a sequence

mutate

{dplyr}

Create new variables

ifelse

{base}

Return a or b depending on the value of test

sqrt

{base}

Square-root function

binomial

{base}

Family argument in glm()

read.csv

{utils}

Read a csv file to data frame. Specify stringsAsFactors = FALSE to keep all string columns as characters

lag

{dplyr}

Shift values in a vector or time series

nrow

{base}

Get number of rows of a data frame

vcovSCC

{plm}

Computes Driscoll and Kraay (SCC) robust covariance matrix estimators for panel models

cut

{base}

Convert Numeric to Factor

library

{base}

Load an R package

summary

{base}

Obtain summary statistics or detailed regression output

length

{base}

Returns number of elements in an object

diag

{base}

Extract or construct diagonal elements or matrices

group_tt

{tinytable}

Grouping in tinytable

range

{base}

Return range of values

ls

{base}

Return a vector of character strings giving the names of the objects in the specified environment

View

{base}

View a data frame

t.test

{stats}

Performs one and two sample t-tests on vectors of data.

names

{base}

Get or set names of an object

head

{utils}

Show first 5 rows of a data frame

ordered

{dplyr}

Create an ordered factor

install.packages

{utils}

Install R packages

dnorm

{stats}

Density distribution for the normal distribution

nobs

{stats}

Return the number of observations in a model object

coeftest

{lmtest}

Inference for Estimated Coefficients

expression

{base}

Used in plots to add symbols to axes

ungroup

{dplyr}

Resolve grouping created with “group_by”

modelsummary

{modelsummary}

Creates regression and data tables

data.frame

{base}

Create a data.frame from vectors

rm

{base}

Remove objects

min

{base}

Get minimum of a vector

pdata.frame

{plm}

Creates a panel data frame, the data structure used by the plm package for panel/longitudinal data

glm

{base}

Fits generalized linear models

theme_latex

{tinytable}

A theme for modelsummary/tinytable tables

max

{base}

Get maximum of a vector

quantile

{stats}

Obtain empirical quantiles of a vector

var

{stats}

Calculate variance

plm

{plm}

Estimates linear panel data models (fixed effects, random effects, pooling, between, first-differences)

The end!